<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>内联和内联块混用的问题</title>
    <style>
        div{
            height:50px;
            line-height: 50px;
            background: red;
            position: relative;
        }
        .position-center-y{
            position: absolute;
            top:50%;
            transform: translateY(-50%);
        }
        div>span:nth-of-type(1){margin-left: 40px}
    </style>
</head>
<body>
    <div>
        <img class="position-center-y" src="images/location.png" alt=""> <span>span</span> <span>span</span>
    </div>
</body>
</html>